//
//  LingYeNativeExpressFullscreenVideoAd.h
//  LingYeAdSDK
//
//  Created by admin on 2021/3/29.
//

#import <UIKit/UIKit.h>
#import <LingYeAdSDK/LingYeSourceAdType.h>
#import <LingYeAdSDK/LingYeBidReason.h>
@class LingYeNativeExpressFullscreenVideoAd;

NS_ASSUME_NONNULL_BEGIN


@protocol LingYeNativeExpressFullscreenVideoAdDelegate <NSObject>

@optional
/// 广告加载成功
/// @param fullscreenVideoAd 广告实例对象
- (void)lingye_nativeExpressFullscreenVideoAdDidLoad:(LingYeNativeExpressFullscreenVideoAd *)fullscreenVideoAd;

/// 广告加载实例
/// @param fullscreenVideoAd 广告实例
/// @param error 错误
- (void)lingye_nativeExpressFullscreenVideoAd:(LingYeNativeExpressFullscreenVideoAd *)fullscreenVideoAd didFailWithError:(NSError *_Nullable)error;

/// 渲染成功
/// @param fullscreenVideoAd 广告实例
- (void)lingye_nativeExpressFullscreenVideoAdViewRenderSuccess:(LingYeNativeExpressFullscreenVideoAd *)fullscreenVideoAd;

/// 广告渲染失败
/// @param fullscreenVideoAd 广告实例
/// @param error 错误
- (void)lingye_nativeExpressFullscreenVideoAdViewRenderFail:(LingYeNativeExpressFullscreenVideoAd *)fullscreenVideoAd didFailWithError:(NSError *_Nullable)error;

/// 全屏视频广告已经展示
/// @param fullscreenVideoAd 实例对象
- (void)lingye_nativeExpressFullscreenVideoAdDidVisible:(LingYeNativeExpressFullscreenVideoAd *)fullscreenVideoAd;

/// 全屏视频广告点击
/// @param fullscreenVideoAd 实例对象
- (void)lingye_nativeExpressFullscreenVideoAdDidClick:(LingYeNativeExpressFullscreenVideoAd *)fullscreenVideoAd;

///全屏视频广告关闭
/// @param fullscreenVideoAd 实例对象
- (void)lingye_nativeExpressFullscreenVideoAdDidClose:(LingYeNativeExpressFullscreenVideoAd *)fullscreenVideoAd;

/// 全屏视频广告详情页关闭
/// @param fullscreenVideoAd 实例对象
- (void)lingye_nativeExpressFullscreenVideoAdDidCloseOtherController:(LingYeNativeExpressFullscreenVideoAd *)fullscreenVideoAd;

///  全屏视频广告播放失败
- (void)lingye_nativeExpressFullscreenVideoAdDidPlayFinish:(LingYeNativeExpressFullscreenVideoAd *)fullscreenVideoAd didFailWithError:(NSError *_Nullable)error;

@end

@interface LingYeNativeExpressFullscreenVideoAd : NSObject

/// 代理对象
@property(nonatomic,weak)id<LingYeNativeExpressFullscreenVideoAdDelegate> delegate;

/// 消耗方类型
@property(nonatomic,assign)LingYeAdSourceType sourceType;

/// 广告ecpm  单位分
@property(nonatomic,assign)NSInteger ecpm;

/// 禁止使用此方法来初始化
+ (instancetype)new NS_UNAVAILABLE;

/// 禁止使用此方法来初始化
- (instancetype)init NS_UNAVAILABLE;

/// 初始化方法
/// @param placementId 广告id
- (instancetype)initWithPlacementId:(nonnull NSString *)placementId NS_DESIGNATED_INITIALIZER;

/// 加载广告
- (void)loadAd;

/// 展示广告稿】
/// @param rootViewController 当前控制器
- (BOOL)showAdFromRootViewController:(UIViewController *)rootViewController;

/// 通知广告平台的广告竞胜
///  @param costPrice 竞胜价格
///  @param secondPrice 二价
- (void)notifyBidWin:(double)costPrice secondPrice:(double)secondPrice;
/// 通知广告平台的广告竞败
/// @param bidLossReason 竞败原因
- (void)notifyBidLoss:(LingYeBidReason *)bidLossReason;

@end

NS_ASSUME_NONNULL_END
